package com.example.usermanagement.context;

import com.example.usermanagement.vo.UserInfoVO;

/**
 * @author yha
 * @ClassName
 * @description:TODO
 * @date 2024年09月10日
 * @version: 1.0.0
 */
public class UserContext {
    private static ThreadLocal<UserInfoVO> userInfoVOThreadLocal = new ThreadLocal<>();



    public static UserInfoVO getUserInfoVO(){
        return userInfoVOThreadLocal.get();
    }

    public static void setUserInfoVOThreadLocal(UserInfoVO userInfoVO){
        userInfoVOThreadLocal.set(userInfoVO);
    }

    public static void removeUserInfoThreadLocal(){
        userInfoVOThreadLocal.remove();
    }
}
